<?php /* Smarty version 2.6.13, created on 2008-09-17 14:58:13
         compiled from new_module.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'new_module.tpl', 3, false),)), $this); ?>
<form id="paramsForm">
<div class="form">
    <label for="name">название</label><?php echo smarty_function_html_options(array('name' => "name]",'id' => 'name','options' => $this->_tpl_vars['modulesList'],'selected' => $this->_tpl_vars['nodeName'],'class' => 'flat','style' => "width: 200px;"), $this);?>
<br/>
    <label for="view">вид отображения</label>
    <div style="float: left; width: 210px;" id="view_div"></div><br/>
    <div style="border: 1px solid black;" id="params_div">
        &nbsp;
    </div>
</div>
<input type="hidden" name="_nodeName" id="_nodeName" value="module">
<input type="hidden" name="_nodeId" id="_nodeId" value="<?php echo $this->_tpl_vars['_nodeId']; ?>
">
<input type="hidden" name="_xmlContent" id="_xmlContent" value="<?php echo $this->_tpl_vars['_xmlContent']; ?>
">
</form>
<?php echo '
<script>
    function changeName(e) {
        new Ajax.Updater(\'view_div\', "';  echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
pages/getmoduleview/<?php echo '", {
            parameters: {
                _xmlContent: $F(\'_xmlContent\'),
                _nodeId: $F(\'_nodeId\'),
                module_name: $F(\'name\')
            },
            onComplete: function (transport, json) {
                $(\'view\').observe(\'change\', changeView);
                changeView();
            }
        });
    };
    
    function changeView(e) {
        new Ajax.Updater(\'params_div\', "';  echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
pages/getmoduleparam/<?php echo '", {
            parameters: {
                _xmlContent: $F(\'_xmlContent\'),
                _nodeId: $F(\'_nodeId\'),
                module_name: $F(\'name\'), 
                module_view: $F(\'view\')
            },
            onComplete: function (transport, json) {
                
            }
        });
    };

    $(\'name\').observe(\'change\', changeName);
    changeName();
</script>
'; ?>